package com.pn.mapper;

import com.github.pagehelper.Page;
import com.pn.entity.Brand;
import com.pn.entity.Place;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface PlaceMapper {

    //显示产地列表
    Page<Place> placePageList(Place place);

    //修改产地
    int placeUpdate(Place place);

    //添加产地
    @Insert("insert into place values (null,#{placeName},#{placeNum},#{introduce},0)")
    int placeInsert(Place place);

    //删除产地
    @Update("update place set is_delete = 1 where place_id = #{placeId}")
    int placeDelete(Integer placeId);

    //显示产地表
    @Select("select * from place where is_delete = 0")
    List<Place> placeList();
}
